#include "shared_ptr3.h"
// #include <memory>
// using std::shared_ptr;
#include <iostream>
using std::cout;
using std::endl;


int main(int argc, char const *argv[])
{
    shared_ptr<int> sp1(new int(3));
    shared_ptr<int> sp2(sp1);
    {
        shared_ptr<int> sp3(sp2);
        cout << sp3.use_count() << endl;
    }
    cout << sp1.use_count() << endl;
    cout << sp2.use_count() << endl;

    cout << *sp1 << " " << sp1.get() << endl;
    cout << *sp2 << " " << sp2.get() << endl;


    return 0;
}
